package com.aispeech.asr.apis.ssc.websocket.connection;


import org.springframework.core.io.buffer.NettyDataBufferFactory;

import io.netty.buffer.UnpooledByteBufAllocator;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public class DateBufferFactory {
	//懒汉式单例
	private DateBufferFactory() {
		 
	}
	    
    //静态内部类
    private static class DateBufferFactoryHandler {
        private final static NettyDataBufferFactory instance = new NettyDataBufferFactory(new UnpooledByteBufAllocator(false));
        //private final static NettyDataBufferFactory instance = new NettyDataBufferFactory(ByteBufAllocator.DEFAULT);
    }

    public static NettyDataBufferFactory getInstance() {
        return DateBufferFactoryHandler.instance;
    }
}
